//
//  main.c
//  LearnC
//
//  Created by 劉裕 on 10/10/2016.
//  Copyright © 2016 劉裕. All rights reserved.
//

#include <CoreFoundation/CoreFoundation.h>
#include <objc/runtime.h>
#include <objc/message.h>

extern int UIApplicationMain(int, ...);

int main(int argc, char *argv[]) {
    id autoreleasePool = objc_msgSend(
            objc_msgSend((id) objc_getClass("NSAutoreleasePool"), sel_registerName("alloc")),
            sel_registerName("init"));

    UIApplicationMain(argc, argv, nil, CFSTR("AppDelegate"));

    objc_msgSend(autoreleasePool, sel_registerName("drain"));
}
